package me.firstapp.module.weixin.order;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import me.firstapp.module.base.BaseEntity;

@Entity
@Table(name = "SPREAD_ORDER")
public class SpreadOrder extends BaseEntity {

	private static final long serialVersionUID = -6449484769462591121L;

	public static final int SETTLE_FLAG_NOT = 0;
	public static final int SETTLE_FLAG_YES = 1;

	// 推广人微信openId
	@Column(name = "OPEN_ID", length = 40, nullable = false)
	private String openId;

	// 推广人卡号
	@Column(name = "CARD_NO", length = 40, nullable = false)
	private String cardNo;

	// 被推广人微信openId
	@Column(name = "BEI_OPEN_ID", length = 40, nullable = false)
	private String beiOpenId;

	// 被推广人卡号
	@Column(name = "BEI_CARD_NO", length = 40, nullable = false)
	private String beiCardNo;

	// 订单创建时间
	@Column(name = "CREATE_TIME", columnDefinition = "DATETIME", nullable = false)
	private Date createTime;

	// 结算标志，0未结算；1已结算
	@Column(name = "SETTLE_FLAG", columnDefinition = " TINYINT DEFAULT 0 ", nullable = false)
	private Integer settleFlag;

	// 结算时间
	@Column(name = "SETTLE_TIME", columnDefinition = "DATETIME")
	private Date settleTime;

	// 赠送推广人积分
	@Column(name = "GIVE_POINT", columnDefinition = "DECIMAL(11, 4)", nullable = false)
	private BigDecimal givePoint;

	// 赠送推广人贝币
	@Column(name = "GIVE_JIN_BI", columnDefinition = "DECIMAL(11, 4)", nullable = false)
	private BigDecimal giveJinBi;

	public String getOpenId() {
		return openId;
	}

	public void setOpenId(String openId) {
		this.openId = openId;
	}

	public String getCardNo() {
		return cardNo;
	}

	public void setCardNo(String cardNo) {
		this.cardNo = cardNo;
	}

	public String getBeiOpenId() {
		return beiOpenId;
	}

	public void setBeiOpenId(String beiOpenId) {
		this.beiOpenId = beiOpenId;
	}

	public String getBeiCardNo() {
		return beiCardNo;
	}

	public void setBeiCardNo(String beiCardNo) {
		this.beiCardNo = beiCardNo;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Integer getSettleFlag() {
		return settleFlag;
	}

	public void setSettleFlag(Integer settleFlag) {
		this.settleFlag = settleFlag;
	}

	public Date getSettleTime() {
		return settleTime;
	}

	public void setSettleTime(Date settleTime) {
		this.settleTime = settleTime;
	}

	public BigDecimal getGivePoint() {
		return givePoint;
	}

	public void setGivePoint(BigDecimal givePoint) {
		this.givePoint = givePoint;
	}

	public BigDecimal getGiveJinBi() {
		return giveJinBi;
	}

	public void setGiveJinBi(BigDecimal giveJinBi) {
		this.giveJinBi = giveJinBi;
	}

}
